import jwt
from  django.conf import settings
def jwt_div(user):
    property={
        # 'id':user.id,
        'username':user.username
    }
    token=jwt.encode(payload=property,key=settings.SECRET_KEY,algorithm='HS256')
    return token